package com.kosam.rabbitmqservice.controller;

import com.kosam.rabbitmqservice.send.Sender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by tgx on 2017/3/7.
 */
@RestController
public class RabbitmqController {
    @Autowired
    private Sender sender;
    @RequestMapping(value = "/send", method = RequestMethod.GET)
    public String send(HttpServletRequest request, String msg) {
        sender.send(msg);
        return "Send OK.";
    }
}
